package com.pfzy.lib.config;

import android.content.Context;
import android.content.SharedPreferences;
import android.util.Log;

public class AppConfig {
    private static SharedPreferences sp = null;
    public static final String APPCONFIG_SP_NAME = "APPCONFIG_SP_DRIVER_v3";
    private static final String SP_PRIVACY_PROTOCOL_STATUS = "sp_privacy_protocol_status";

    public static void init(Context context, boolean isMainProcess) {
        if (sp == null) {
            sp = context.getSharedPreferences(APPCONFIG_SP_NAME, 0);
        }
    }

    /**
     * 隐私协议状态
     */
    public static boolean isPrivacyProtocolAgreed() {
        return sp.getBoolean(SP_PRIVACY_PROTOCOL_STATUS, false);
    }
    public static void setPrivacyProtocolStatus(boolean agreed) {
        sp.edit().putBoolean(SP_PRIVACY_PROTOCOL_STATUS, agreed).commit();
    }



}
